<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div></div>
<p>获得内容</p>
<script>
  let div=document.querySelector('div')
  // div.innerText='<strong>今天是</strong>'
  // div.innerHTML='<strong>今天是</strong>'
  let p =document.querySelector('p');
  div.innerText=p.innerText;
</script>
</body>
</html>